package com.wander.business.book.c2_2_4;

import com.wander.business.book.c2_2_3.config.BookConfig_c2_2_3;
import com.wander.business.book.c2_2_4.config.BookConfig_c2_2_4;
import com.wander.business.book.c2_2_4.entity.DemoBean;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author Wander.Zeng
 * @create 2017-10-15 16:07
 * @desc BookMain
 */
public class BookMain {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();

        context.getEnvironment().setActiveProfiles("prod");// prod dev
        context.register(BookConfig_c2_2_4.class);
        context.refresh();

        DemoBean demoBean = context.getBean(DemoBean.class);
        System.out.println(demoBean.getContent());

        context.close();
    }

}
